package com.lff.service.impl;

import com.lff.domain.Bill;
import com.lff.mapper.BillMapper;
import com.lff.service.BillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;
@Service
public class BillServiceImpl implements BillService {
    @Autowired
    private BillMapper billMapper;

    @Override
    public List<Bill> findAll(Long queryProviderId, Long queryIsPayment, String queryProductName) {
        return billMapper.findAll(queryProviderId,queryIsPayment,queryProductName);
    }

    @Override
    public Bill findById(Long id) {
        return billMapper.findById(id);
    }

    @Override
    public void modifyBill(Bill bill) {
        billMapper.updateBill(bill);
    }

    @Override
    public void save(Bill bill) {
        billMapper.addBill(bill);
    }

    @Override
    public Integer delBill(Long id) {
        return billMapper.deleteById(id);
    }
}
